package com.example.web;


import com.example.pojo.UserInfo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("cors")
public class UserCorsController {
    @PostMapping("/")
//    @CrossOrigin(value = "http://localhost:8081",maxAge = 1800,allowedHeaders="*")
    public String addUser(String name) {
        return "receive:" + name;
    }


    @DeleteMapping("/{id}")
//    @CrossOrigin(value = "http://localhost:8081",maxAge = 1800,allowedHeaders="*")
    public String deleteUserByld(@PathVariable Long id) {
        return String.valueOf(id);
    }
}